<!DOCTYPE html>

<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->

    <head>
        <meta charset="utf-8" />

        <!-- Set the viewport width to device width for mobile -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title>Welcome to Foundation</title>

        <!-- Included CSS Files -->
        <link rel="stylesheet" href="stylesheets/app.css">

        <script src="javascripts/foundation/modernizr.foundation.js"></script>

    </head>
    <body>

        <nav class="top-bar fixed">
            <ul>
                <li class="name"><h1><a href="#">ImportadorDirectoUsa.com</a></h1></li>
                <li class="toggle-topbar"><a href="#"></a></li>
            </ul>

            <section class="row">
                <ul class="left">
                    <li><a href="#">Inicio</a></li>
                    <li><a href="#">Quienes Somos</a></li>
                    <li><a href="#">Pedidos &AMP; Cotizaciones</a></li>
                    <li><a href="#">Subastas</a></li>
                    <li><a href="#">Contactenos</a></li>
                </ul>

                <ul class="right">
                    <li class="has-dropdown">
                        <a href="#">Paises</a>

                        <ul class="dropdown">
                            <li><a href="#">Costa Rica</a></li>
                            <li><a href="#">Nicaragua</a></li>
                            <li><a href="#">Guatemala</a></li>
                            <li><a href="#">Honduras</a></li>
                        </ul>
                    </li>
                </ul>
            </section>

        </nav>
        <!-- End Navigation -->

        <div class="row social-media hide-for-small">
            <div class="twelve columns">
                FACEBOOK
            </div>
            <div class="twelve columns">
                CHAT
            </div>
        </div>

        <div class="row">
            <div class="twelve columns">

                <!-- Desktop Slider -->

                <div class="hide-for-small">
                    <div id="featured">
                        <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image">
                        <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image">
                        <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image">
                    </div>
                </div>

                <!-- End Desktop Slider -->

            </div>
        </div>

        <div class="row">

            <div class="three panel columns">
                <img src="http://placehold.it/500x500&text=Image">

                <h4>Header</h4>

                <p>Fusce ullamcorper mauris in eros dignissim molestie posuere felis blandit. Aliquam erat volutpat. Mauris ultricies posuere vehicula. Sed sit amet posuere erat. Quisque in ipsum non augue euismod dapibus non et eros.</p><hr>

                <div class="row">
                    <div class="four columns">
                        <a href="#" class="small button">Link</a>
                    </div>

                    <div class="four columns">
                        <a href="#" class="small button">Link</a>
                    </div>

                    <div class="four columns">
                        <a href="#" class="small button">Link</a>
                    </div>
                </div>
            </div>
            <?php
            require_once '../../databaseutility/CarroManager.php';
            //error_reporting(0);
            $Dboj = new CarroManager();
            ?>
            <div class="nine columns">
                <div class="panel">
                    <div class="row">
                        <?php
                        if (isset($_REQUEST['parameter'])) {
                            $parameter = $_REQUEST['parameter'];
                        } else {
                            $parameter = 1;
                        }

                        $rowsperpage = 15;

                        if ($parameter == 1) {
                            $CarroArray = $Dboj->GetAllCarros(0, $rowsperpage);
                        } else {
                            $CarroArray = $Dboj->GetAllCarros((($parameter - 1) * $rowsperpage), $rowsperpage);
                        }

                        $totalpages = ceil($Dboj->GetTotalCarro() / $rowsperpage);



                        for ($i = 0; $i < count($CarroArray); $i++) {

                            echo '<div class = "three columns">';
                            echo "<a href='info.php?id=" . $CarroArray[$i][0] . "'><img src='../../pictures/" . $CarroArray[$i][43] . "' width='150' height='150' border='0'/></a>";
                            echo "<div>" . $CarroArray[$i][46] . " " . $CarroArray[$i][7] . "</div>";
                            echo "<div>A&ntilde;o: " . $CarroArray[$i][11] . "</div>";
                            echo "<div>$" . $CarroArray[$i][12] . "</div>";
                            echo '</div>';
                        }

                        ?>
                        <!--                        <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>
                        
                                                <div class="three columns end">
                                                    <img src="http://placehold.it/600x500&text=Thumbnail">
                                                </div>-->
                    </div>
                </div>

                <div class="row">
                    <div class="six columns">
                        <div class="panel">
                            <h5>Subheader</h5>
                            <p>Sed sit amet posuere erat. Quisque in ipsum non augue euismod dapibus non et eros.</p>
                            <a href="#" class="small button">Link</a>
                        </div>
                    </div>

                    <div class="six columns">
                        <div class="panel">
                            <h5>Subheader</h5>
                            <p>Sed sit amet posuere erat. Quisque in ipsum non augue euismod dapibus non et eros.</p>
                            <a href="#" class="small button">Link</a>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <!-- Footer -->

        <footer class="row">
            <div class="twelve columns"><hr />
                <div class="row">

                    <div class="six columns">
                        <p>&copy; <?php echo date('Y'); ?> Todos los derechos reservados. <a href="http://www.webdesignius.com/" target="_blank">WebDesignius</a></p>
                    </div>

                    <div class="six columns">
                        <ul class="link-list right">
                            <li><a href="#">Link 1</a></li>
                            <li><a href="#">Link 2</a></li>
                            <li><a href="#">Link 3</a></li>
                            <li><a href="#">Link 4</a></li>
                        </ul>
                    </div>

                </div>
            </div>
        </footer>

        <!-- End Footer -->

        <!-- End Mobile Header -->

        <!-- Included JS Files (Uncompressed) -->
        <script src="javascripts/foundation/jquery.js"></script>

        <script src="javascripts/foundation/jquery.cookie.js"></script>

        <script src="javascripts/foundation/jquery.event.move.js"></script>

        <script src="javascripts/foundation/jquery.event.swipe.js"></script>

        <script src="javascripts/foundation/jquery.foundation.accordion.js"></script>

        <script src="javascripts/foundation/jquery.foundation.alerts.js"></script>

        <script src="javascripts/foundation/jquery.foundation.buttons.js"></script>

        <script src="javascripts/foundation/jquery.foundation.clearing.js"></script>

        <script src="javascripts/foundation/jquery.foundation.forms.js"></script>

        <script src="javascripts/foundation/jquery.foundation.joyride.js"></script>

        <script src="javascripts/foundation/jquery.foundation.magellan.js"></script>

        <script src="javascripts/foundation/jquery.foundation.mediaQueryToggle.js"></script>

        <script src="javascripts/foundation/jquery.foundation.navigation.js"></script>

        <script src="javascripts/foundation/jquery.foundation.orbit.js"></script>

        <script src="javascripts/foundation/jquery.foundation.reveal.js"></script>

        <script src="javascripts/foundation/jquery.foundation.tabs.js"></script>

        <script src="javascripts/foundation/jquery.foundation.tooltips.js"></script>

        <script src="javascripts/foundation/jquery.foundation.topbar.js"></script>

        <script src="javascripts/foundation/jquery.placeholder.js"></script>


        <!-- Application Javascript, safe to override -->
        <script src="javascripts/foundation/app.js"></script>

        <script type="text/javascript">
            $(window).load(function() {
                $('#featured').orbit({fluid: '2x1'});
            });
        </script>
    </body>
</html>
